Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change progress status to Completed in modules #2342

Merged
merged 1 commit into from Feb 25, 2019
Merged

Change progress status to Completed in modules #2342

merged 1 commit into from Feb 25, 2019

Conversation

tonytettinger
Copy link
Contributor

Issue

As stated in issue #2313 the status doesn't change from "In Progress" to "Completed" even if all modules are marked completed.

Problem description

The template-function.php file calls the get_user_module_progress() function from the class-sensei-modules.php. The resulting progress number is determining the output for the progress tab on the page. The problem is that when the get_user_module_progress() runs it doesn't get the correct input.

Solution

To solve this I have added one line of code, calling a function to make sure that the progress data is up to date and saved to the metadata, so the input is correct before it's processed and sent back to determine the status of the module.

sens1

sens2

Test

To test load a page with all completed lessons and also add new lessons and mark them as completed to check correct functionaity.

@donnapep donnapep changed the base branch from master to release/2.0 February 25, 2019 16:21
@donnapep donnapep self-requested a review February 25, 2019 16:35
@donnapep donnapep added this to the 2.0.0 milestone Feb 25, 2019
@donnapep donnapep merged commit a5f66cc into Automattic:release/2.0 Feb 25, 2019
@tonytettinger tonytettinger deleted the fix/showing-completed-module branch February 26, 2019 11:11
alexsanford pushed a commit that referenced this pull request Mar 25, 2019
@donnapep donnapep modified the milestones: 2.0.0, 1.12.3 Mar 27, 2019
@donnapep donnapep changed the title Fix bug: Change progress status to Completed in Modules Change progress status to Completed in modules Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants